// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:54:17

// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   q1.java

package com.zelix;

import java.awt.Component;
import java.io.File;
import javax.swing.*;

// Referenced classes of package com.zelix:
//            v3, b0, g2

class q1 extends DefaultListCellRenderer
    implements ListCellRenderer
{

    private final v3 a;
    b0 b;
    private static String z;

    q1(v3 v3_1)
    {
        a = v3_1;
        b = new b0();
    }

    public Component getListCellRendererComponent(JList jlist, Object obj, int i, boolean flag, boolean flag1)
    {
        String s;
        String s1;
        boolean flag2;
label0:
        {
            flag2 = g2.b;
            super.getListCellRendererComponent(jlist, obj, i, flag, flag1);
            s = obj.toString();
            s1 = s;
            if(s1.equals("."))
            {
                s1 = a.h;
                if(!flag2)
                    break label0;
            }
            if(s1.equals(z))
            {
                s1 = a.i.getParent();
                if(s1 == null)
                    s1 = a.h;
            }
        }
label1:
        {
            File file = new File(s1);
            javax.swing.Icon icon = b.a(file);
            if(icon != null)
                setIcon(icon);
            if(s.equals(".") || s.equals(z))
            {
                setText(s);
                if(!flag2)
                    break label1;
            }
            if(a.g)
            {
                setText(file.getAbsolutePath());
                if(!flag2)
                    break label1;
            }
            setText(file.getName());
        }
        return this;
    }

    private static String z(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0xe;
                    break;
                case 1:
                    key = 114;
                    break;
                case 2:
                    key = 90;
                    break;
                case 3:
                    key = 23;
                    break;
                default:
                    key = 102;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static 
    {
        z = z(" \\".toCharArray());

    }
}